package iCal;

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;

public class icalFile {

	public static void main(String[] args){
		try {
			PrintWriter writer = new PrintWriter("newFile.ics", "UTF-8");
			
			String DTSTART = ("TZID=Pacific/Honolulu:20140702T080000");
			String DTEND = ("TZID=Pacific/Honolulu:20140702T120000");
			String SUMMARY = ("Study");
			String LOCATION = ("Hamilton Library");
			
			writer.println("BEGIN:VCALENDAR");
			writer.println("VERSION:2.0");
			writer.println("BEGIN:VEVENT");
			writer.println("DTSTART;" + DTSTART);
			writer.println("DTEND;" + DTEND);
			writer.println("SUMMARY:" + SUMMARY);
			writer.println("LOCATION:" + LOCATION);
			writer.println("END:VEVENT");
			writer.println("END:VCALENDAR");
			
			writer.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}
}
